home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000013_icon-group-sender _Sat Jan 13 14:58:33 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 16 Jan 1996 08:54:03 MST
  2. From: "Hamish Lawson" <H.Lawson@tees.ac.uk>
  3. Organization:  University of Teesside (SCM)
  4. To: icon-group@cs.arizona.edu
  5. Date:          Sat, 13 Jan 1996 14:58:33 GMT0BST
  6. Subject:       Initialising tables
  7. Reply-To: H.Lawson@tees.ac.uk
  8. Priority: normal
  9. X-Mailer: Pegasus Mail/Windows (v1.22)
  10. Message-Id: <4B78DE79AC@scm_arkengarthdale.tees.ac.uk>
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: O
  13.  
  14. Is there an quick way to initialise tables, along the lines of the
  15. list assignment below?
  16.  
  17.    aList := ["this","list","is","a","list"]
  18.  
  19. I've cooked up the following, but is there a more concise way?
  20.  
  21.    aTable := table()
  22.    every entry := ![["bob",2],["sue",5],["fred",12],["mary",9]] do
  23.       aTable[entry[1]] := entry[2]
  24.  
  25. | Hamish Lawson, School of Computing and Mathematics, 
  26. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  27. | Tel: +44 1642 218121 x3611  Fax: +44 1642 342604
  28. | E-mail: H.Lawson@tees.ac.uk 
  29.